import * as React from 'react';
import {setupLanguage} from "./todo-lang/setup";
import { Editor, EditorInterface } from './components/Editor/Editor';
import { languageID } from './todo-lang/config';
import * as monaco from 'monaco-editor-core';

// 语言属性设置 高亮关键字、自动提示代码片段等
setupLanguage();

// 创建控件 并通过 languageID 与设置语言相关联
export const CodeEditor = (props: EditorInterface) => {
    const state = {...props}
    state.language = languageID
return <Editor {...state}/>
}
